package org.hzero.order.domain.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;

/**
 * @author xiuiqng.Yang-Estelle-양수청
 * @date 2019/8/5 14:02
 */

/**
 * 实体类
 */
@ApiModel("销售订单行")
@ModifyAudit
@VersionAudit
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "hodr_so_line")
@Data
public class Line extends AuditDomain {

    @Id
    @GeneratedValue
    private Long soLineId;

    @NotNull
    @ApiModelProperty("订单头ID")
    private Long soHeaderId;

    @NotNull
    @ApiModelProperty("行号")
    private Integer lineNumber;

    @NotNull
    @ApiModelProperty("产品ID")
    private Long itemId;

    @NotNull
    @ApiModelProperty("数量")
    private BigDecimal orderQuantity;

    @NotBlank
    @ApiModelProperty("产品单位")
    private String orderQuantityUom;

    @NotNull
    @ApiModelProperty("销售单价")
    private BigDecimal unitSellingPrice;

    @ApiModelProperty("备注")
    private String description;

    @ApiModelProperty("附加信息1")
    private String addition1;
    @ApiModelProperty("附加信息2")
    private String addition2;
    @ApiModelProperty("附加信息3")
    private String addition3;
    @ApiModelProperty("附加信息4")
    private String addition4;
    @ApiModelProperty("附加信息5")
    private String addition5;

    @Transient
    private String orderNumber;
    @Transient
    private Long companyId;
    @Transient
    private Long customerId;
    @Transient
    private Date orderDate;
    @Transient
    private String orderStatus;
}
